package com.j180.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Date;

public class StudentBean {


    private Integer id;
     @JsonProperty("student_name")
    private String name;

    @JsonFormat(pattern="yyyy-MM-dd")
    private Date birthday;

    @JsonIgnore //忽略属性 不转为json
    private String gender;

    private ClassBean classBean;

    public StudentBean(Integer id, String name, Date birthday, String gender, ClassBean classBean) {
        this.id = id;
        this.name = name;
        this.birthday = birthday;
        this.gender = gender;
        this.classBean = classBean;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public ClassBean getClassBean() {
        return classBean;
    }

    public void setClassBean(ClassBean classBean) {
        this.classBean = classBean;
    }

    @Override
    public String toString() {
        return "StudentBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", birthday=" + birthday +
                ", gender='" + gender + '\'' +
                ", classBean=" + classBean +
                '}';
    }
}
